home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Microsoft Programmer's Library
/
Microsoft Programmer's Library (CD-ROM Database)(125-099-008)(Version 1.1a)(CDRM 162100)(1989).iso
/
SAMPCODE
/
OS2SDK11
/
TK4
/
OPENDLG
/
TOOL.C
< prev
next >
Wrap
C/C++ Source or Header
|
1989-02-20
|
1KB
|
40 lines
/*
TOOL.C -- Contains commonly used routines and globals
Created by Microsoft Corporation, 1989
*/
#define NO_DOS
#define NO_GPI
#include "tool.h"
/****************************************************************************\
* This function returns the character following the current one.
\****************************************************************************/
PSZ FAR PASCAL NextChar (PSZ lpsz)
{ if (*lpsz) return ++lpsz; else return lpsz; }
/****************************************************************************\
* This function returns the character previous to the current one.
\****************************************************************************/
PSZ FAR PASCAL PrevChar (PSZ lpszStart, PSZ lpszCurrent)
{ if (lpszCurrent > lpszStart) return --lpszCurrent; else return lpszStart; }
/****************************************************************************\
* This function transforms a string to upper case.
\****************************************************************************/
PSZ FAR PASCAL Upper (PSZ lpsz) {
PSZ lpszPtr = lpsz;
while (*lpszPtr) {
if (*lpszPtr >= 'a' && *lpszPtr <= 'z') *lpszPtr &= ~0x20;
lpszPtr++;
}
return lpsz;
}